HatchShape BoundaryShapeList

Gets a read only list of boundary shapes associated with this hatch shape.

public ReadOnlyCollection<ScanShape> BoundaryShapeList{get;Set}

 

Return value

ReadOnlyCollection<ScanShape> A collection of boundary shapes

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    vectorImage.AddEllipticalArc(0, 0, 0, 10, 0, 3, 0, 120 * (float)(Math.PI / 180));

    HatchShape hatchShape = new HatchShape();

    HatchPatternLine lineHatch = new HatchPatternLine();
    lineHatch.Spacing = 0.05f;
    lineHatch.BorderGap = 0.5f;
    lineHatch.BorderGapDirection = HatchLineBorderGapDirection.Inward;
    lineHatch.LineStyle = HatchLineStyle.Serpentine;
    lineHatch.OffsetAlgorithm = HatchOffsetAlgorithm.DirectOffset;
    lineHatch.WithOffset = true;
    lineHatch.CornerStyle = HatchCornerStyle.Sharp;

    hatchShape.AddHatchPattern(lineHatch);
    hatchShape.AddHatchPatternHelixFilling(0.25f, HelixStyle.InwardToOut, HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);

    hatchShape.AddEllipticalArc2D(0, 0, 10, 0, 3, 0, 120 * (float)(Math.PI / 180));

    vectorImage.AddHatch(hatchShape, 0);

    int shapeCount = hatchShape.BoundaryShapeList.Count;
    if( shapeCount > 0)
    {
        ScanShape shape = hatchShape.BoundaryShapeList.ElementAt(0);
        shape.Move(0.5f, 0.5f);
    }

    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));

    try
    {
        scanDocument.StartScanning();
    }
    catch (Exception exp)
    {
        MessageBox.Show(exp.Message);
    }
}